/**
 * @file GroupShell.java
 * @project springshell
 * @copyright 无锡雅座在线科技股份有限公司
 */
package com.example.springshell.demo;

import org.springframework.shell.standard.ShellCommandGroup;
import org.springframework.shell.standard.ShellComponent;
import org.springframework.shell.standard.ShellMethod;

/**
 * 命令分组
 * @author maliqiang
 * @create 2017-12-04
 * @version 1.0
 */
@ShellComponent
@ShellCommandGroup("Special")
public class GroupShell {

    /**
     * 在方法上通过group参数进行指定分组
     * @param cmd
     * @return
     */
    @ShellMethod(group = "groupDemo",value = "group属性指定命令分组")
    public String groupOne(String cmd){
        return "execute cmand:"+cmd;
    }

    @ShellMethod(group = "groupDemo",value = "group属性指定命令分组")
    public String groupTwo(String cmd){
        return "execute cmand:"+cmd;
    }
}
